package bit.study;

public class ObjectArray {
	private int size; //3
	private int totalSize; //10
	private Object[] arr;
	
	public ObjectArray(){
		this(10);
	}
	
	public ObjectArray(int totalSize){
		this.totalSize = totalSize;	
		arr = new Object[totalSize];	
	}
	
	public void add(Object data){
		arr[size++] = data;
	}
	
	public Object get(int index){
		return arr[index];
	}
	
	public int size(){
		return size;
	}
}
